package sort;

import java.util.Arrays; //给出两个数组a和b,将两个数组合并，按升序排序

public class Sort {
    public static void main(String[] args) {
        int[]a={1,7,9,11,13,15,17,19};
        int[]b={2,4,6,8,10};
        int[]c=new int[a.length+b.length];
        System.arraycopy(a,0,c,0,a.length);
        System.arraycopy(b,0,c,a.length,b.length);
        Arrays.sort(c);//这里对数组c进行升序排序，Arrays.sort()可以直接实现排序
        System.out.println(Arrays.toString(c));
    }
}
